package test2;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
//通过Spring容器创建Student并输出该对象内容
public class Demo {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("test2");
        Student student = context.getBean(Student.class);
        System.out.println(student);
    }
}
